<!DOCTYPE html>
<html lang="zh_cn" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>角色列表</title>
    <link rel="stylesheet" type="text/css" href="tools/zTree/css/metroStyle/metroStyle.css"/>
</head>
<body>
<input type="hidden" id="menuId" value="${menuId}"/>
<div class="portlet box grey-cascade" style="width: 99%">
    <div class="portlet-title">
        <div class="caption">
            <i class="fa fa-gift"></i>查询条件
        </div>
        <div class="tools">
        </div>
    </div>
    <div class="portlet-body form">
        <br />
        <form class="form-horizontal">
            <div class="col-sm-4">
                <label class="control-label col-md-4">角色名称：</label>
                <div class="input-group">
                    <input class="form-control" placeholder="角色名称" name="roleName" id="roleNameQuery" th:autofocus="true" />
                </div>
            </div>
            <button id="query" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i>查询</button>
        </form>
        <br/>
    </div>
</div>
<!-- BEGIN EXAMPLE TABLE PORTLET-->
<div class="portlet box grey-cascade" style="width: 99%">
    <div class="portlet-title">
        <div class="caption">
            <i class="fa fa-globe"></i>系统角色
        </div>
        <div class="tools">
        </div>
    </div>
    <div class="portlet-body" style="font-size: 14px">
        <div class="table-toolbar">
            <div class="row">
                <div class="col-md-6">
                    <div class="btn-group">
                        <button type="button" id="add" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i>新增</button>
                    </div>
                    <div class="btn-group">
                        <button type="button" class="btn green" id="update">修改</button>
                    </div>
                    <div class="btn-group">
                        <button type="button" class="btn red" id="del">删除</button>
                    </div>
                    <div class="btn-group">
                        <button type="button" class="btn green" id="settings">设置权限</button>
                    </div>
                </div>
            </div>
        </div>
        <table class="table table-striped table-bordered table-hover" id="dataTables">
            <thead>
            <tr>
                <th>序号</th>
                <th>角色名称</th>
                <th>角色描述</th>
                <th>角色代码</th>

            </tr>
            </thead>
            <tbody></tbody>
        </table>
    </div>
</div>
<!-- END EXAMPLE TABLE PORTLET-->

<div id="win" style="display: none;width: 99%" class="portlet-body form">
    <form role="form" action="sysRole/addOrUpdate" method="post" id="form" class="form-horizontal">
        <input type="hidden" value="${_csrf.token}" name="${_csrf.parameterName}" />
        <input type="hidden" value="" name="id" id="userId" />
        <div class="form-body">
            <div class="form-group">
                <label class="control-label col-md-3">角色名称 <span class="required">* </span>
                </label>
                <div class="col-md-8">
                    <input type="text" class="form-control" name="roleName" id="role_name" placeholder="请输入角色名称" />
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-md-3">角色代码 <span class="required">* </span>
                </label>
                <div class="col-md-8">
                    <input type="text" class="form-control" name="roleAuth" id="role_auth" placeholder="请输入角色代码" />
            </div>
            </div>
            <div class="form-group" id="passwordPwd">
                <label class="control-label col-md-3">角色描述
                </label>
                <div class="col-md-8">
                    <input type="text" class="form-control" name="roleDesc" id="role_desc" placeholder="" />
                </div>
            </div>
        </div>
    </form>
</div>
<div class="content_wrap" id="treeWin" style="display: none;">
    <table style="width: 100%">
        <tr style="width: 50%">
            <td>
                <div class="zTreeDemoBackground left" style="margin-left: 17px;">
                    <ul id="treeDemo" class="ztree"></ul>
                </div>
            </td>
            <td style="margin-left: 10px;width: 50%" valign="top">
                <div id="buttonDiv" class="right" style="margin-left: -50px;display: none">
                    <ul class="info">
                        <li class="title"><h2 id="buttonTitle"></h2>
                            <input type="hidden" id="roleId"/>
                            <input type="hidden" id="resourceId"/>
                            <div id="showBtnDiv">
                            </div>
                        </li>
                    </ul>
                </div>
            </td>
        </tr>
    </table>
</div>
<script src="tools/zTree/js/jquery.ztree.core.js"></script>
<script src="tools/zTree/js/jquery.ztree.excheck.js"></script>
<script type="text/javascript">
    jQuery(document).ready(function () {
        require(["modules/sys/sysRoleList"], function (view) {
            view.initPage();
        });
    });
</script>
</body>
</html>